<template>
	<view>
		<activity-list :data="activities" @handleClick="handleRectifyNoticeList"></activity-list>
	</view>
</template>

<script>
	import {
		getAllEndActivity
	} from "@/api/school/index.js"
	export default {
		data() {
			return {
				activities: [],
			}
		},
		computed: {
			schoolId() {
				return this.$store.state.user.schoolId
			},
		},
		methods: {
			allEndActivity() {
				getAllEndActivity().then(res => {
					console.log(res)
					if (res.status === 0) {
						this.activities = res.activities
					}
				})
			},
			handleRectifyNoticeList() {
				this.$tab.navigateTo('/pages/school-work/school-rectifyNotice/notice-list?schoolId=' + this
					.schoolId)
			}
		},
		onLoad() {
			this.allEndActivity()
		}
	}
</script>

<style>

</style>